var mongoose = require("mongoose");
var url = "mongodb://127.0.0.1:27017/leave";
mongoose.connect(url, {
    useNewUrlParser: true
});
mongoose.connection.on("connected", function() {
    console.log("链接成功");
})
mongoose.connection.on("error", function(err) {
    console.log("发送的错误为:" + err);
})
module.exports = mongoose;